home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ccdl150l.zip / IO / FPUTC.C < prev    next >
C/C++ Source or Header  |  1997-04-08  |  436b  |  25 lines

  1. #include <stdio.h>
  2. #include <time.h>
  3. #include <libp.h>
  4.  
  5. int _baseputc(int c, FILE *stream);
  6. int fputc(int c, FILE *stream)
  7. {
  8.     if (stream->token != FILTOK)
  9.         return EOF;
  10.     if (!(stream->flags & _F_WRIT)) {
  11.         stream->flags |= _F_ERR;
  12.         return EOF;
  13.     }
  14.     return _baseputc(c,stream);
  15. }
  16. #undef putc
  17. #undef putchar
  18. int putc(int c, FILE *stream)
  19. {
  20.     return fputc(c,stream);
  21. }
  22. int putchar(int c)
  23. {
  24.     return fputc(c,stdout);
  25. }